<?php echo $html->css("pepper-grinder/jquery.ui.all"); ?>
<?php echo $this->Html->script('jquery/jquery.ui.core'); ?>
<?php echo $this->Html->script('jquery/jquery.ui.widget'); ?>
<?php echo $this->Html->script('jquery/jquery.ui.datepicker'); ?>
<?php echo $this->Html->script('jquery/jquery.ui.datepicker-pt-BR'); ?>

<script>
    $(function() {
        $( "#datepicker" ).datepicker({
            showOn: "button",
            buttonImage: "<?php echo $this->webroot;?>img/calendar.gif",
            buttonImageOnly: true
        });
    });
</script>

<div class="titulos">Contas a Pagar :: Adicionar</div>
<div class="pagamentos form">
    <?php echo $this->Form->create('Pagamento'); ?>
    <table id="tabela_mvc">
        <tr>
            <th>Descrição: </th>
            <td><?php echo $this->Form->input('descricao', array('label' => '', 'size' => '40','class'=>'validateRequired','alt'=>'Descrição')); ?></td>
        </tr>
        <tr>
            <th>Categoria</th>
            <td><?php echo $this->Form->input('categoria_id', array('label' => '')); ?></td>
        </tr>
        <tr>
            <th>Data</th>
            <td><input type="text" class="validateDateBR validateRequired" alt="Data" id="datepicker" name="data[Pagamento][data]"/></td>
        </tr>    
        <tr>
            <th>Valor</th>
            <td><?php echo $this->Form->input('valor', array('label' => '', 'size' => '20','class'=>'validateMoeda validateRequired','alt'=>'Valor')); ?></td>
        </tr>
        <tr>
            <th>Recorrente</th>
            <td><?php echo $this->Form->input('recorrente', array('label' => '', 'type' => 'checkbox')); ?></td>
        </tr>
        <tr>
            <td colspan="2" class="nobg">
                <?php
                $url = "'" . $html->url(array('action' => 'index')) . "'";
                echo $form->button(__("Voltar", true), array("class" => "botao", 'onclick' => 'location.href=' . $url, 'type' => 'button'));
                ?>
                <input type="submit" value="Salvar" class="botao" />
            </td>
        </tr>
    </table>

</div>
